from django.db import models
from django.contrib.auth.models import AbstractUser

# Create your models here.

class Users(AbstractUser):
    """
    用户信息扩展
    """
    display = models.CharField('显示的中文名', max_length=50, default='')
    wechat_id = models.CharField('企业微信ID', max_length=30, null=True, blank=True)

    def __str__(self):
        if self.display:
            return self.display
        return self.username

    class Meta:
        managed = True
        verbose_name = '用户管理'
        verbose_name_plural = '用户管理'


